<block name="navbar">
    <div class="weui-tabbar" style="position: fixed;bottom:0;">
        <a href="#" class="weui-tabbar__item " onclick="changeIndexStatus()">
                        <span style="display: inline-block;position: relative;">
                            <img id="indexImg" src="{$Think.config.HOME_IMG}index{$nav1|default='1'}.png" alt=""
                                 class="weui-tabbar__icon">
                        </span>
            <p id="index" class="weui-tabbar__label {$col1}">首页</p>
        </a>
        <a href="#" class="weui-tabbar__item " onclick="changeServiceStatus()">
            <img id="serverImg" src="{$Think.config.HOME_IMG}service{$nav2|default='1'}.png" alt="" class="weui-tabbar__icon">
            <p id="service" class="weui-tabbar__label {$col2}">客服</p>
        </a>
        <a href="#" class="weui-tabbar__item" onclick="changeCarStatus()">
                        <span style="display: inline-block;position: relative;">
                            <img id="carImg" src="{$Think.config.HOME_IMG}riding{$nav3|default='1'}.png" alt="" class="weui-tabbar__icon">
                        </span>
            <p id="car" class="weui-tabbar__label" {$col3}>我的订单</p>
        </a>
        <a href="#" class="weui-tabbar__item" onclick="changeMyStatus()">
            <img id="myImg" src="{$Think.config.HOME_IMG}my{$nav4|default='1'}.png" alt="" class="weui-tabbar__icon">
            <p id="my" class="weui-tabbar__label {$col4}">我的</p>
        </a>

        <script>

            //初始化首页按钮
            $(function () {
                if('{$col1}'!==''){
                    $("#index").addClass("mycolor");
                    $('#indexImg').attr('src', '{$Think.config.HOME_IMG}index2.png');
                }

            });


            function changeIndexStatus() {
                window.location.href = "{:U('Home/Index/index')}";
                /*改变导航颜色*/

            }

            function changeServiceStatus() {

                window.location.href = "{:U('Home/Server/index')}";

            }

            function changeCarStatus() {

                window.location.href = "{:U('Home/MyTicket/getHadNoPayTicket')}";

            }

            function changeMyStatus() {
                /*改变导航颜色*/
                window.location.href = "{:U('Home/User/index')}";

            }

        </script>
    </div>
</block>
